table
Section: OATH Reference Manual (3O)
Updated: 26 August 1991
Index
Return to Main Contents
NAME
table (tableA, tableG) - a collection of associated objs
SYNOPSIS
#include <oath/table.h>
DESCRIPTION
The table is a bag of objs, each of which has an "associated" obj.
The associated objs are NOT considered to be members of the table.
As with any bag, the table may be a "filter", allowing some objs
to "fall through".
DERIVATION
table : bag : obj
table is an abstract type.
STATIC OPERATIONS
- tableA tableA:: isa (objA)
-
tableA::isa(O) returns O if it is truly a table; otherwise it returns Nil.
MEMBER OPERATIONS
- tableA tableA:: insert (objA, objA)
-
T.insert(O, A) inserts obj O into table T and associates it with obj A.
- tableA tableA:: operator << (objA)
-
T << O is the same as T.insert(O, Nil).
- tableA tableA:: operator << (bagA)
-
T << B will execute T << O for each member of bag B.
- tableA tableA:: operator << (tableA)
-
T1 << T2 will execute T1.insert(O, A) for each member and associated obj of
table T2.
- tableA tableA:: reassoc (objA, objA)
-
T.reassoc(O, A) will find obj O in T, and re-associate it with obj A. If O
is not in T, then this is the same as T.insert(O,A).
- objA tableA:: assoc (objA)
-
T.assoc(O) returns the obj associated with obj O in table T.
- objA tableA:: remove (objA)
-
T.remove(O) removes obj O from table T and returns the obj that was associated
with it.
- tableA tableA:: extract (objA)
-
T.extract(O) removes obj O from table T.
INTERNAL OPERATIONS
- void tableG:: insertAssoc (const objG*, const objG*)
-
- void tableG:: reassoc (const objG*, const objG*)
-
- const objG* tableG:: assoc (const objG*) const
-
- const objG* tableG:: remove (const objG*)
-
SEE ALSO
OATH(3O), bag(3O), obj(3O)
AUTHOR
Brian M. Kennedy (Computer Science Center, Texas Instruments Incorporated)
BUGS
The behavior of inserting an obj that is already a member of a table
is not well-defined. StringTable has chosen, for efficiency, to stack
them. However, this should be better defined. Table is intended to
support hierarchical tables (ala complex symbol tables). If stack behavior
is defined, then a function seqA assocAll() should be added to get all
objects associated with a given object.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- DERIVATION
-
- STATIC OPERATIONS
-
- MEMBER OPERATIONS
-
- INTERNAL OPERATIONS
-
- SEE ALSO
-
- AUTHOR
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 00:37:22 GMT, March 30, 2022